Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency html-entities to v2 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Sep 29, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
html-entities ^1.3.1 -> ^2.0.0 age adoption passing confidence

Release Notes

mdevils/html-entities

v2.3.3

Compare Source

  • package.json: specify sideEffects: false

v2.3.2

Compare Source

  • Minimize data files, remove unnecessary files.

v2.3.1

Compare Source

  • Improve performance of encode(), decode() and decodeEntity() by using function inlining.
  • Fix decoding HEX HTML entities in some cases.

v2.3.0

Compare Source

  • Add flow types.

v2.2.0

Compare Source

  • A fast decodeEntity() method to decode a single HTML entity.

v2.1.1

Compare Source

  • Speed up both encode() and decode() methods.

v2.1.0

Compare Source

  • Add extensive mode to encode() method. This mode encodes all non-printable characters, non-ASCII characters and all characters with named references.

v2.0.6

Compare Source

  • Handle invalid numeric HTML entities: mimic browser behaviour.

v2.0.5

Compare Source

  • Handling behaviour of ambiguous ampersands.

v2.0.4

Compare Source

  • Fix webpack build warning.

v2.0.3

Compare Source

  • Handle invalid numeric HTML entities.

v2.0.2

Compare Source

  • Handle null and undefined text values.

v2.0.1

Compare Source

  • Fix decoding numeric HTML entities.

v2.0.0

Compare Source

  • Performance was greatly improved.

  • New API: simpler and more flexible.

    htmlEntitiesInstance.encode(text) -> encode(text)

    Before:

    import {AllHtmlEntities} from 'html-entities';
    
    const entities = new AllHtmlEntities();
    console.log(
        entities.encode('<Hello & World>')
    );

    After:

    import {encode} from 'html-entities';
    
    console.log(
        encode('<Hello & World>')
    );

    instance.encodeNonASCII(text) -> encode(text, {mode: 'nonAscii'})

    Before:

    import {AllHtmlEntities} from 'html-entities';
    
    const entities = new AllHtmlEntities();
    console.log(
        entities.encodeNonASCII('& © ∆')
    );

    After:

    import {encode} from 'html-entities';
    
    console.log(
        encode('& © ∆', {mode: 'nonAscii'})
    );

    instance.encodeNonASCII(text) -> encode(text, {mode: 'nonAsciiPrintable'})

    Before:

    import {AllHtmlEntities} from 'html-entities';
    
    const entities = new AllHtmlEntities();
    console.log(
        entities.encodeNonASCII('& © ∆ \x01')
    );

    After:

    import {encode} from 'html-entities';
    
    console.log(
        encode('& © ∆ \x01', {mode: 'nonAsciiPrintable'})
    );

    instance.decode(text) -> decode(text)

    Before:

    import {AllHtmlEntities} from 'html-entities';
    
    const entities = new AllHtmlEntities();
    console.log(
        entities.decode('&lt;&gt;&amp;')
    );

    After:

    import {decode} from 'html-entities';
    
    console.log(
        decode('&lt;&gt;&amp;')
    );

    Different XML/HTML versions are now implemented via options instead of different classes.

    Before:

    import {XmlEntities, Html4Entities, Html5Entities, AllHtmlEntities} from 'html-entities';
    
    const xmlEntities = new XmlEntities();
    const html4Entities = new Html4Entities();
    const html5Entities = new Html5Entities();
    const allHtmlEntities = new AllHtmlEntities();
    
    console.log(xmlEntities.encode('<>&'));
    console.log(html4Entities.encode('<>&©'));
    console.log(html5Entities.encode('<>&©℞'));
    console.log(allHtmlEntities.encode('<>&©℞'));
    
    console.log(xmlEntities.decode('&lt;&gt;&amp;'));
    console.log(html4Entities.decode('&lt;&gt;&amp;&copy;'));
    console.log(html5Entities.decode('&lt;&gt;&amp;&copy;&rx;'));
    console.log(allHtmlEntities.decode('&lt;&gt;&amp;&copy;&rx;'));

    After:

    import {encode, decode} from 'html-entities';
    
    console.log(encode('<>&', {level: 'xml'}));
    console.log(encode('<>&©', {level: 'html4', mode: 'nonAscii'}));
    console.log(encode('<>&©℞', {level: 'html5', mode: 'nonAscii'}));
    console.log(encode('<>&©℞', {level: 'all', mode: 'nonAscii'}));
    
    console.log(decode('&lt;&gt;&amp;', {level: 'xml'}));
    console.log(decode('&lt;&gt;&amp;&copy;', {level: 'html4'}));
    console.log(decode('&lt;&gt;&amp;&copy;&rx;', {level: 'html5'}));
    console.log(decode('&lt;&gt;&amp;&copy;&rx;', {level: 'all'}));

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant